$(function () {

    var hgS1 = new selectSwiper({
        el:'.select_box1',
        // mustSelect:true, // 是否必选，默认false
        // activeIndex: 0,//默认激活项下标，默认值：-1
        data: ['不限', '商业街商铺', '住宅','商住两用','写字楼','商业综合体','独栋','厂房','土地','车位','社区底商','档口摊位','其他'],//选项数据
        init:function(index){
            if(index !== -1){
                $('.xingzhi').html(this.data[index]);
            }
        },
        okFunUndefind: function () {//选择说明项-'请选择'
            alert('必须选择一项');
            return false;
        },
        okFun: function (index) {//确认按钮
            console.log(index);
            $('.xingzhi').html(this.data[index]);
			$('.xingzhi').attr("style","color:#333333");
        },
        closeFun: function () {//取消按钮
            console.log('取消');
        },
    });
    $('.xingzhi').on('click', function () {
        hgS1.openSelectSwiper(); // 打开选择框
    });


    var hgS2 = new selectSwiper({
        el:'.select_box2',
        data: ['不限','0-30', '30-60', '60-100', '100-200', '200-500', '500-1000', '1000-3000','3000以上'],//选项数据
        init:function(index){
            if(index !== -1){
                $('.mianjinum').html(this.data[index]);
            }
        },
        okFunUndefind: function () {//选择说明项-'请选择'，mustSelect为true生效
            alert('必须选择一项');
            // return false;
        },
        okFun: function (index) {//确认按钮
            $('.mianjinum').html(this.data[index]);
        },
        closeFun: function () {//取消按钮
            console.log('取消');
        },
    });
    $('.mianji').on('click', function () {
        hgS2.openSelectSwiper(); // 打开选择框
    });


    var hgS3 = new selectSwiper({
        el:'.select_box3',
        data: ['不限','0-2000','2000-5000','5000-1万','1万-2万','2万-5万','5万以上'],//选项数据
        init:function(index){
            if(index !== -1){
                $('.zujinnum').html(this.data[index]);
            }
        },
        okFunUndefind: function () {//选择说明项-'请选择'
            alert('必须选择一项');
            return false;
        },
        okFun: function (index) {//确认按钮
            $('.zujinnum').html(this.data[index]);
        },
        closeFun: function () {//取消按钮
            console.log('取消');
        },
    });
    $('.zujin').on('click', function () {
        hgS3.openSelectSwiper(); // 打开选择框
    });
	
	var hgS4 = new selectSwiper({
		el:'.select_box4',
		data: ['不限','0-5万元','5-20万元','20-50万元','50-200万元','200万元以上'],//选项数据
		init:function(index){
			if(index !== -1){
				$('.zrf').html(this.data[index]);
			}
		},
		okFunUndefind: function () {//选择说明项-'请选择'
			alert('必须选择一项');
			return false;
		},
		okFun: function (index) {//确认按钮
			$('.zrf').html(this.data[index]);
			$('.zrf').attr("style","color:#333333");
		},
		closeFun: function () {//取消按钮
			console.log('取消');
		},
	});
	$('.zrf').on('click', function () {
		hgS4.openSelectSwiper(); // 打开选择框
	});
	
	var hgS5 = new selectSwiper({
		el:'.select_box5',
		data: ['一般','多','旺','特旺'],//选项数据
		init:function(index){
			if(index !== -1){
				$('.rll').html(this.data[index]);
			}
		},
		okFunUndefind: function () {//选择说明项-'请选择'
			alert('必须选择一项');
			return false;
		},
		okFun: function (index) {//确认按钮
			$('.rll').html(this.data[index]);
			$('.rll').attr("style","color:#333333");
		},
		closeFun: function () {//取消按钮
			console.log('取消');
		},
	});
	$('.rll').on('click', function () {
		hgS5.openSelectSwiper(); // 打开选择框
	});
	
	// 总价
	var hgS6 = new selectSwiper({
		el:'.select_box6',
		data: ['不限','100万元以下','100-200万元','200-400万元','400-1000万元','1000万元以上'],//选项数据
		init:function(index){
			if(index !== -1){
				$('.zongjianum').html(this.data[index]);
			}
		},
		okFunUndefind: function () {//选择说明项-'请选择'
			alert('必须选择一项');
		},
		okFun: function (index) {//确认按钮
			$('.zongjianum').html(this.data[index]);
		},
		closeFun: function () {//取消按钮
			console.log('取消');
		},
	});
	$('.zongjia').on('click', function () {
		hgS6.openSelectSwiper(); // 打开选择框
	});
	
	// 单价
	var hgS7 = new selectSwiper({
		el:'.select_box7',
		data: ['1万元以下','1-1.5万元','1.5万元以上万'],//选项数据
		init:function(index){
			if(index !== -1){
				$('.danjianum').html(this.data[index]);
			}
		},
		okFunUndefind: function () {//选择说明项-'请选择'
			alert('必须选择一项');
		},
		okFun: function (index) {//确认按钮
			$('.danjianum').html(this.data[index]);
		},
		closeFun: function () {//取消按钮
			console.log('取消');
		},
	});
	$('.danjia').on('click', function () {
		hgS7.openSelectSwiper(); // 打开选择框
	});
	
	var hgS8 = new selectSwiper({//是否辦證
		el:'.select_box8',
		data: ['是','否'],//选项数据
		init:function(index){
			if(index !== -1){
				$('.bz').html(this.data[index]);
			}
		},
		okFunUndefind: function () {//选择说明项-'请选择'
			alert('必须选择一项');
		},
		okFun: function (index) {//确认按钮
			$('.bz').html(this.data[index]);
			$('.bz').css('color','black');
		},
		closeFun: function () {//取消按钮
			console.log('取消');
		},
	});
	$('.bz').on('click', function () {
		hgS8.openSelectSwiper(); // 打开选择框
	});
	
	var hgS9 = new selectSwiper({//是否辦證
		el:'.select_box9',
		data: ['是','否'],//选项数据
		init:function(index){
			if(index !== -1){
				$('.zx').html(this.data[index]);
			}
		},
		okFunUndefind: function () {//选择说明项-'请选择'
			alert('必须选择一项');
		},
		okFun: function (index) {//确认按钮
			$('.zx').html(this.data[index]);
			$('.zx').css('color','black');
		},
		closeFun: function () {//取消按钮
			console.log('取消');
		},
	});
	$('.zx').on('click', function () {
		hgS9.openSelectSwiper(); // 打开选择框
	});
	
	var hgS10 = new selectSwiper({//是否辦證
		el:'.select_box10',
		data: ['是','否'],//选项数据
		init:function(index){
			if(index !== -1){
				$('.zd').html(this.data[index]);
			}
		},
		okFunUndefind: function () {//选择说明项-'请选择'
			alert('必须选择一项');
		},
		okFun: function (index) {//确认按钮
			$('.zd').html(this.data[index]);
			$('.zd').css('color','black');
		},
		closeFun: function () {//取消按钮
			console.log('取消');
		},
	});
	$('.zd').on('click', function () {
		hgS10.openSelectSwiper(); // 打开选择框
	});
	
	var hgS11 = new selectSwiper({//是否辦證
		el:'.select_box11',
		data: ['是','否'],//选项数据
		init:function(index){
			if(index !== -1){
				$('.bz1').html(this.data[index]);
			}
		},
		okFunUndefind: function () {//选择说明项-'请选择'
			alert('必须选择一项');
		},
		okFun: function (index) {//确认按钮
			$('.bz1').html(this.data[index]);
			$('.bz1').css('color','black');
		},
		closeFun: function () {//取消按钮
			console.log('取消');
		},
	});
	$('.bz1').on('click', function () {
		hgS11.openSelectSwiper(); // 打开选择框
	});
	
	var hgS12 = new selectSwiper({//是否辦證
		el:'.select_box12',
		data: ['是','否'],//选项数据
		init:function(index){
			if(index !== -1){
				$('.zx1').html(this.data[index]);
			}
		},
		okFunUndefind: function () {//选择说明项-'请选择'
			alert('必须选择一项');
		},
		okFun: function (index) {//确认按钮
			$('.zx1').html(this.data[index]);
			$('.zx1').css('color','black');
		},
		closeFun: function () {//取消按钮
			console.log('取消');
		},
	});
	$('.zx1').on('click', function () {
		hgS12.openSelectSwiper(); // 打开选择框
	});
	
	var hgS13 = new selectSwiper({//是否辦證
		el:'.select_box13',
		data: ['是','否'],//选项数据
		init:function(index){
			if(index !== -1){
				$('.zd1').html(this.data[index]);
			}
		},
		okFunUndefind: function () {//选择说明项-'请选择'
			alert('必须选择一项');
		},
		okFun: function (index) {//确认按钮
			$('.zd1').html(this.data[index]);
			$('.zd1').css('color','black');
		},
		closeFun: function () {//取消按钮
			console.log('取消');
		},
	});
	$('.zd1').on('click', function () {
		hgS13.openSelectSwiper(); // 打开选择框
	});
	// 交租方式
	var hgS14 = new selectSwiper({//是否辦證
		el:'.select_box14',
		data: ['押一付一','押一付三','押三付一','押三付三','押三付六','其他'],//选项数据
		init:function(index){
			if(index !== -1){
				$('.jzfs').html(this.data[index]);
			}
		},
		okFunUndefind: function () {//选择说明项-'请选择'
			alert('必须选择一项');
		},
		okFun: function (index) {//确认按钮
			$('.jzfs').html(this.data[index]);
			$('.jzfs').css('color','black');
		},
		closeFun: function () {//取消按钮
			console.log('取消');
		},
	});
	$('.jzfs').on('click', function () {
		hgS14.openSelectSwiper(); // 打开选择框
	});


	var hgS15 = new selectSwiper({
		el:'.select_box15',
		data: ['押一付一','押一付三','押三付一','押三付三','押三付六','其他'],//选项数据
		init:function(index){
			if(index !== -1){
				$('.jzfs').html(this.data[index]);
			}
		},
		okFunUndefind: function () {//选择说明项-'请选择'
			alert('必须选择一项');
		},
		okFun: function (index) {//确认按钮
			$('.jzfs').html(this.data[index]);
			$('.jzfs').css('color','black');
		},
		closeFun: function () {//取消按钮
			console.log('取消');
		},
	});
	$('.jzfs').on('click', function () {
		hgS14.openSelectSwiper(); // 打开选择框
	});
	// 建筑年代
	var myDate = new Date();
	var year=myDate.getFullYear();
	var hgS16 = new selectSwiper({
		el:'.select_box16',
		data: [year,year-1,year-2,year-3,year-4,year-5,year-6,year-7,year-8,year-9,year-10,year-11,year-12,year-13,year-14,year-15,year-16,year-17,year-18,year-19,year-20,year-21,year-22,year-23,year-24,
		year-25,year-26,year-27,year-28,year-29,year-30,year-31,year-32,year-33,year-34,year-35,year-36,year-37,year-38,year-39,year-10,year-41,year-42,year-43,year-44,year-45,year-46,year-47,year-48
		,year-49,year-50,,year-51,year-52,year-53,year-54,year-55,year-56,year-57,year-58,year-59],//选项数据
		init:function(index){
			if(index !== -1){
				$('.houseyear').html(this.data[index]);
			}
		},
		okFunUndefind: function () {//选择说明项-'请选择'
			alert('必须选择一项');
		},
		okFun: function (index) {//确认按钮
			$('.houseyear').html(this.data[index]);
			$('.houseyear').css('color','black');
		},
		closeFun: function () {//取消按钮
			console.log('取消');
		},
	});
	$('.houseyear').on('click', function () {
		hgS16.openSelectSwiper(); // 打开选择框
	});
	// 是否明火
	var hgS17 = new selectSwiper({
		el:'.select_box17',
		data: ['是','否'],//选项数据
		init:function(index){
			if(index !== -1){
				$('.mh').html(this.data[index]);
			}
		},
		okFunUndefind: function () {//选择说明项-'请选择'
			alert('必须选择一项');
		},
		okFun: function (index) {//确认按钮
			$('.mh').html(this.data[index]);
			$('.mh').css('color','black');
		},
		closeFun: function () {//取消按钮
			console.log('取消');
		},
	});
	$('.mh').on('click', function () {
		hgS17.openSelectSwiper(); // 打开选择框
	});
});
